import request from '@/utils/request'

/* 轮播图 */
export const getSwiper = () => request.get('/home/swiper')

/* 城市列表 */
export const getCity = () => request.get('/area/city', { params: { level: 1 } })

/* 热门城市 */
export const getHot = () => request.get('/area/hot')

/* 发布房屋所需条件 */
export const getHoursLiter = () => request.get('/houses/params')

// 租房小组
export const getGroups = (area) => request.get('/home/groups', {
  params: { area }
})

/* 查询城市信息 */
export const getAreaInfo = (name) => request.get('/area/info', { params: { name } })

// 关键字查询小区
export const getAreaName = (data) => request.get('/area/community', { params: data })

// 图片上传
export const getImage = data => request.post('/houses/image', data)

// 发布房屋
export const postHours = data => request.post('/user/houses', data)

// 获取筛选房屋条件
export const getCondition = id => request.get('/houses/condition', { params: { id } })

// 筛选
export const getHours = data => request.get('/houses', { params: data })
